1. Field of the Invention
This invention generally relates to distributed transaction processing, and more particularly to the interoperation between existing transaction processing application software programmed for processing non-global transactions and transaction processing application software programmed for processing global transactions.
2. Description of the Prior Art
Advances in hardware and software technology, in combination with new computing models, are expanding the possible functionality for On-line Transaction Processing (OLTP) application software.
On-line Transaction Processing (OLTP) is a style of data processing in which users at terminals or workstations send messages to application programs which update databases in real time. This is in contrast to batch or queued processing of transactions where the transactions are processed at a later time. An example of an OLTP application is an airline reservation system.
A transaction may be thought of as a set of actions performed by a transaction processing system wherein the actions together exhibit the properties of Atomicity, Consistency, Isolation, and Durability (ACID). The following definitions are given in Transaction Processing: Concepts and Techniques by Jim Gray and Andreas Reuter, Morgan Kaufmann Publishers, Inc., 1993, p. 6:
Atomicity. A transaction's changes to the state are atomic; either all happen or none happen. These changes include database changes, messages, and actions on transducers.
Consistency. A transaction is a correct transformation of the state. The actions taken as a group do not violate any of the integrity constraints associated with the state. This requires that the transaction be a correct program.
Isolation. Even though transactions execute concurrently, it appears to each transaction, T, that other transactions execute either before T or after T, but not both.
Durability. Once a transaction completes successfully, (commits), its changes to the state survive system failures.
To maintain the properties identified above, at the beginning of processing a transaction, a transaction processing application invokes a Begin.sub.-- Transaction function to indicate processing of a transaction has begun. This operation is typically logged to an audit file to demarcate the operations associated with a particular transaction. Following the Begin.sub.-- Transaction function, the other functions associated with the application defined transaction are performed and are also logged to an audit file. If all operations associated with a transaction complete successfully, a Commit function is invoked to make permanent any state changes that have occurred as a result of the transaction. The Commit operation is logged to the audit file to indicate that all operations have completed successfully. If an error occurs during processing of the transaction and a Commit operation is not performed, a Rollback function is invoked to undo the effects of the operations performed in processing the transaction.
The Client/Server computing model provides a framework in which the functionality of transaction processing applications may be expanded. Under the traditional mainframe transaction processing application model, the user interface, application control, and data management control all execute on a single data processing system. Under the traditional model, the transaction processing application will be referred to as a terminal based or an independent transaction processing application. The transaction processing application is terminal based because it expect to receive input from and directs output to a terminal. The transaction processing application is independent because it maintains transaction control independent of other applications. Generally, the Client/Server computing model involves a Client application submitting service requests to a Server application, and the Server application processing the requests and returning responses to the Client. Thus, a Client/Server environment has the user interface, application control, and dam management control distributed among two or more data processing systems. The Server applications must contain data management components and may also provide some functions of other components.
One widely used scheme for classifying Client/Server type systems is according to how they distribute user interface, application, and data management components between the Client and Server data processing systems. Two examples include the remote presentation type Client/Server application and the distributed data processing Client/Server application. In a remote presentation application, all the user interface functionality resides on the Client system and all other functionality resides on the Server system.
For a distributed data processing Client/Server system, the data management functionality is divided between the Client and Server systems. All other functionality is placed on the Client system. The distributed data processing Client/Server model allows databases to be split among multiple systems and fosters development of distributed transaction processing applications.
Transaction processing in a Client/Server environment may be either non-global or global. In a non-global client/server transaction, the same work takes place as in a traditional transaction, but the work is distributed in a Client/Server manner. For example, a travel agent may request an airline reservation via a workstation Client application that has a graphical user interface. The Client application communicates with a Server application that manages the reservation database. The server program updates the database, commits or aborts its own work, and returns information to the Client application, which notifies the travel agent.
A global transaction consists of multiple, coordinated database updates, possibly occurring on different computers. Global transactions are used when it is important that all databases are synchronized so that either all updates are made or none are made. Continuing with the previous example, the travel agent may also need to reserve a rental car and hotel room. The customer who is traveling wants to make sure that all reservations are coordinated; if a flight is unavailable, the hotel and car reservations are not needed. For the purpose of illustrating a global transaction, the airline, car, and hotel databases are on different transaction processing systems.
The global transaction begins when the travel agent requests the reservation from a workstation Client application with a graphical user interface. The client program contacts three Server applications on different transaction processing systems. One Server application books a flight, another reserves a car, and the third makes a hotel reservation. Each of the Server applications updates its respective database. The transaction processed by each of the Server applications may be referred to as a subordinate transaction of the global transaction. A global transaction manager coordinates the updates to the three databases, and a subordinate transaction manager on each of the individual transaction processing systems coordinates locally with the Server applications. The Server applications return information to the Client application.
A major advantage of global transaction processing is that tasks that were once processed individually are processed as a group, the group of tasks being the global transaction. The database updates are made on an all or nothing basis. For example, if an airline seat is not available, the hotel and car reservations are not made. Thus, with a global transaction, tasks that were once performed independently may be coordinated and automated.
As with non-global transactions, global transactions must possess the ACID properties. In order to preserve the ACID properties for a global transaction, the commit processing is modified to a two-phase commit procedure. Under a two-phase commit, a global transaction manager first requests that each of the subordinate transaction managers prepares to commit their updates to the respective databases. If all the local transaction managers respond that they are prepared to commit, the global transaction manager sends a commit request to the local transaction managers. Thus the two parts of the two-phase commit are prepare to commit the database updates and commit the database updates.
Businesses are typically confronted with the competing goals of minimizing their cost of doing business and providing a level of service that is competitive. In today's world, this may be played out in a business seeking to maximize its return on past investment in technology, such as terminal based and independent transaction processing applications, and considering investment in new technology, such as a global transaction processing applications, in order to stay competitive. An independent transaction processing application, such as the airline reservation system mentioned above, represents a sizable investment for a business. To reengineer an entire software system would be extremely expensive, and may present a substantial risk to the day-to-day business operations. Therefore, what is needed is a way to continue to take advantage of the sizable investment in existing independent transaction processing applications and at the same time exploit new technologies and computing models to create enhanced transaction processing applications to be able to compete effectively.